package com.mtsmda.designPattern.factory;

public class ComputerFactory {
	public static final String PC = "PC";
	public static final String SERVER = "SERVER";

	public static Computer getComputer(String type, String hdd, String ram,
			String cpu) {
		if (type.equals(PC)) {
			return new PC(hdd, ram, cpu);
		} else if (type.equals(SERVER)) {
			return new Server(hdd, ram, cpu);
		}
		return null;
	}

}